package databasetools;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;


@Entity
@Table(name = "WEATHERHH")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Weatherhh.findAll", query = "SELECT w FROM Weatherhh w"),
    @NamedQuery(name = "Weatherhh.findByRowId", query = "SELECT w FROM Weatherhh w WHERE w.rowId = :rowId"),
    @NamedQuery(name = "Weatherhh.findByIntDate", query = "SELECT w FROM Weatherhh w WHERE w.intDate = :intDate"),
    @NamedQuery(name = "Weatherhh.findByTemperatur", query = "SELECT w FROM Weatherhh w WHERE w.temperature = :temperature")})
public class Weatherhh implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ROW_ID")
    private Integer rowId;
    @Column(name = "INT_DATE")
    private Integer intDate;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "TEMPERATUR")
    private BigDecimal temperature;

    public Weatherhh() {
    }

    public Weatherhh(Integer rowId) {
        this.rowId = rowId;
    }

    public Integer getRowId() {
        return rowId;
    }

    public void setRowId(Integer rowId) {
        this.rowId = rowId;
    }

    public Integer getIntDate() {
        return intDate;
    }

    public void setIntDate(Integer intDate) {
        this.intDate = intDate;
    }

    public BigDecimal getTemperature() {
        return temperature;
    }

    public void setTemperature(BigDecimal temperature) {
        this.temperature = temperature;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (rowId != null ? rowId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Weatherhh)) {
            return false;
        }
        Weatherhh other = (Weatherhh) object;
        return (this.rowId != null || other.rowId == null) && (this.rowId == null || this.rowId.equals(other.rowId));
    }

    @Override
    public String toString() {
        String tmp = rowId + " | " + intDate + " | " + temperature;
        return tmp;
    }
    
}
